/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.sd.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 系统与文件柜交互记录表Entity
 * @author linyh
 * @version 2020-07-29
 */
@Table(name="sd_file_cabinet_record", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="process_code", attrName="processCode", label="流程代号"),
		@Column(name="policeno", attrName="policeno", label="操作人警号"),
		@Column(name="user_name", attrName="userName", label="操作人姓名", queryType=QueryType.LIKE),
		@Column(name="user_face", attrName="userFace", label="操作人人脸识别图片路径"),
		@Column(name="cabinetno", attrName="cabinetno", label="柜号"),
		@Column(name="response_type", attrName="responseType", label="响应类型", comment="响应类型（1：人脸识别结果 2：开门命令 3：开门结果 4：关门结果）"),
		@Column(name="response_status", attrName="responseStatus", label="响应状态", comment="响应状态（1：成功(允许) 2：失败(禁止)）"),
		@Column(name="operation", attrName="operation", label="操作状态", comment="操作状态（1：已操作 2：未操作）"),
		@Column(name="record_date", attrName="recordDate", label="记录产生日期"),
		@Column(name="remark", attrName="remark", label="备注"),
	}, orderBy="a.id DESC"
)
public class FileCabinetRecord extends DataEntity<FileCabinetRecord> {
	
	private static final long serialVersionUID = 1L;
	private String processCode;		// 流程代号
	private String policeno;		// 操作人警号
	private String userName;		// 操作人姓名
	private String userFace;		// 操作人人脸识别图片路径
	private String cabinetno;		// 柜号
	private String responseType;		// 响应类型（1：人脸识别结果 2：开门命令 3：开门结果 4：关门结果）
	private String responseStatus;		// 响应状态（1：成功(允许) 2：失败(禁止)）
	private String remark;		// 备注
	private String operation;		// 操作状态（1：已操作 2：未操作）
	private Date recordDate;		// 记录产生日期
	
	public FileCabinetRecord() {
		this(null);
	}

	public FileCabinetRecord(String id){
		super(id);
	}
	
	@Length(min=0, max=100, message="流程代号长度不能超过 100 个字符")
	public String getProcessCode() {
		return processCode;
	}

	public void setProcessCode(String processCode) {
		this.processCode = processCode;
	}
	
	@Length(min=0, max=50, message="操作人警号长度不能超过 50 个字符")
	public String getPoliceno() {
		return policeno;
	}

	public void setPoliceno(String policeno) {
		this.policeno = policeno;
	}
	
	@Length(min=0, max=50, message="操作人姓名长度不能超过 50 个字符")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@NotBlank(message="操作人人脸识别图片路径不能为空")
	@Length(min=0, max=1000, message="操作人人脸识别图片路径长度不能超过 1000 个字符")
	public String getUserFace() {
		return userFace;
	}

	public void setUserFace(String userFace) {
		this.userFace = userFace;
	}
	
	@Length(min=0, max=5, message="柜号长度不能超过 5 个字符")
	public String getCabinetno() {
		return cabinetno;
	}

	public void setCabinetno(String cabinetno) {
		this.cabinetno = cabinetno;
	}
	
	@NotBlank(message="响应类型不能为空")
	@Length(min=0, max=1, message="响应类型长度不能超过 1 个字符")
	public String getResponseType() {
		return responseType;
	}

	public void setResponseType(String responseType) {
		this.responseType = responseType;
	}
	
	@NotBlank(message="响应状态不能为空")
	@Length(min=0, max=1, message="响应状态长度不能超过 1 个字符")
	public String getResponseStatus() {
		return responseStatus;
	}

	public void setResponseStatus(String responseStatus) {
		this.responseStatus = responseStatus;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="记录产生日期不能为空")
	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}
	
}